<nav class="navbar navbar-default navbar-fixed-top">
  <div class="container-fluid">
    <div class="navbar-header">
      {php}
      session_start();
      if(false==isset($_SESSION['user'])){
      die();
    }
    {/php}
    <a class="navbar-brand" href="#">{php}echo $_SESSION['user'];{/php}欢迎登录</a>
  </div>
  <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
    <ul class="nav navbar-nav navbar-right">
      <li><a href="{:url('user/logout')}">注销</a></li>
      <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">关于<span class="caret"></span></a>
        <ul class="dropdown-menu">
          <li><a href="#">邮箱投稿</a></li>
          <li><a href="#">关于本站</a></li>
          <li><a href="#">关于作者</a></li>
          <li role="separator" class="divider"></li>
          <li><a href="#">其他</a></li>
        </ul>
      </li>
    </ul>
  </div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<div class="col-sm-12" style="height:60px;">
 <!-- 抵消header navbar-fixed-top -->
</div>
